//
//  MineTableViewCell.m
//  聊吧
//
//  Created by 刘洋 on 16/6/13.
//  Copyright © 2016年 刘洋. All rights reserved.
//

#import "MineTableViewCell.h"

@implementation MineTableViewCell

-(void)dealloc
{
    [_image release];
    [_label release];
    [_LineImage release];
    [_arrow release];
    [super dealloc];
}
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createDiscovery];
    }
    return self;
}

-(void)createDiscovery
{
    self.image = [[UIImageView alloc] init];
  //  self.image.backgroundColor = [UIColor redColor];
    
    [self.contentView addSubview:self.image];
    [self.image release];
    
    self.LineImage = [[UIImageView alloc] init];
    self.LineImage.backgroundColor = [UIColor grayColor];
    [self.contentView addSubview:self.LineImage];
    [self.LineImage release];
    
    self.label = [[UILabel alloc] init];
    self.label.backgroundColor = [UIColor yellowColor];
    [self.contentView addSubview:self.label];
    [self.label release];
    
    self.arrow = [[UIImageView alloc] init];
    self.arrow.backgroundColor = [UIColor grayColor];
    [self.contentView addSubview:self.arrow];
    [self.arrow release];
}

-(void)layoutSubviews
{
    [super layoutSubviews];
    self.image.frame = CGRectMake(10,10,ROOTWIDTH * 0.1 ,ROOTWIDTH * 0.1);
    
    self.LineImage.frame = CGRectMake(10, self.contentView.frame.size.height , ROOTWIDTH - 20, 1);
    
    self.label.frame = CGRectMake(self.image.frame.origin.x + self.image.frame.size.width + 5, self.image.frame.origin.y, self.image.frame.size.width * 3, ROOTWIDTH * 0.1);
    
    self.arrow.frame = CGRectMake(ROOTWIDTH - 40, self.image.frame.origin.y, 30, self.image.frame.size.height);
    
}



/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
